<include file="Common:header" />
<script type="text/javascript">
var my_theme_bgcolor="<{$my[theme_bgcolor]}>";
var my_theme_text="<{$my[theme_text]}>";
var my_theme_link="<{$my[theme_link]}>";
var my_theme_sidebar="<{$my[theme_sidebar]}>";
var my_theme_sidebox="<{$my[theme_sidebox]}>";
var my_user_id="<{$my[user_id]}>";
var temp_dir="default";
var my_bgurl="<{$my[theme_bgurl]}>"
if (!my_theme_bgcolor) {my_theme_bgcolor="#d3edfa";}
if (!my_theme_text) {my_theme_text="#222222";}
if (!my_theme_link) {my_theme_link="#0066CC";}
if (!my_theme_sidebar) {my_theme_sidebar="#e2f2da";}
if (!my_theme_sidebox) {my_theme_sidebox="#b2d1a3";}
</script>
<script type="text/javascript" src="<{:__PUBLIC__}>/js/colorpicker/colorpicker.js"></script>
<script type="text/javascript" src="<{:__PUBLIC__}>/js/theme.js"></script>
<table id="columns">
<tr>
<td id="main" style="-moz-border-radius-bottomleft:8px;">
<div class="contenter">
<div class="indexh">
    <div class="taboff"><a href="<{:SITE_URL}>/Setting">基本设置</a></div>
    <div class="taboff"><a href="<{:SITE_URL}>/Setting/face">修改头像</a></div>
    <div class="taboff"><a href="<{:SITE_URL}>/Setting/account">修改密码</a></div>
    <div class="taboff"><a href="<{:SITE_URL}>/Setting/mailauth">邮箱验证</a></div>
    <div class="tabon"><a href="<{:SITE_URL}>/Setting/theme">模 板</a></div>
</div>
<div class="settings-theme">
    <form id="form-setting-theme" enctype="multipart/form-data" action="<{:SITE_URL}>/Setting/dotheme" method="POST">
    <h3 class="title">选择主题 &raquo;</h3>
    <div id="settings-theme-list" class="list">
    <div id="alltheme">
    <php>foreach($theme as $val){</php>
        <a title="主题<{$val[ut_id]}>" href="javascript:void(0)" onclick="usertheme('<{$val[theme_bgcolor]}>,<{$val[theme_text]}>,<{$val[theme_link]}>,<{$val[theme_sidebar]}>,<{$val[theme_sidebox]}>,<{$val[theme_upload]}>,<{$val[theme_pictype]}>,<{$val[ut_id]}>')"><php>if($val[theme_upload]==1){</php><img src="<{:__PUBLIC__}>/attachments/usertemplates/<{$val[ut_id]}>/thumb_themebg.jpg"/><php>}else{</php><div style="background:<{$val[theme_bgcolor]}>;width:112px;height:72px"></div><php>}</php></a>
    <php>}</php>
    </div>
    <div class="clearline"></div>
    <div class="shoppage">
        <div id="pageleft" class="pageleft"></div>
        <div id="pagenum" class="pagenum">1/1</div>
        <div id="pageright" class="pageright"></div>
    </div>
    </div>
    <h3 id="tab-bg" class="tab-bg show">更换背景图片 &raquo;</h3>
    <h3 id="tab-color" class="tab-color show current">更换颜色 &raquo;</h3>
    <div id="settings-background" class="background" style="display:none;">
        <div class="upload">上传背景：<input id="file" name="bgpicture" class="input_file" size="30" type="file"></div>
        <div class="images" id="themeimages">
            <php>if(file_exists("./Public/attachments/".$my[theme_bgurl])){</php>
            <a href="javascript:void(0);" id="setbgyes" style="background-image: url(<{:__PUBLIC__}>/attachments/<{$my[theme_bgurl]}>);"></a>
            <a href="javascript:void(0);" class="nobg" id="setbgno"><img src="<{:__PUBLIC__}>/images/theme-nobg.gif" alt="">&nbsp;<span>不要背景图片</span></a>
            <p><label for="user-background-repeat"><input id="user-background-repeat" name="pictype" onclick='repeatclick()' type="radio" class="radio" value="repeat" <php>if($my[theme_pictype]=="repeat"){</php>checked<php>}</php>> 平铺背景图片</label>&nbsp;&nbsp;
            <label for="user-background-center"><input id="user-background-center" name="pictype" onclick='centerclick()' type="radio" class="radio" value="center" <php>if($my[theme_pictype]=="center"){</php>checked<php>}</php>> 背景居中</label>&nbsp;&nbsp;
            <label for="user-background-left"><input id="user-background-left" name="pictype" onclick='leftclick()' type="radio" class="radio" value="left" <php>if($my[theme_pictype]=="left"){</php>checked<php>}</php>> 左对齐</label></p>
            <php>}</php>
        </div>
    </div>
    <div id="settings-color" class="color">
        <div id="color-inputs" class="inputs">
            <table>
                <tr>
                    <td><label for="color-background">背景</label></td>
                    <td><label for="color-text">文本</label></td>
                </tr>
                <tr>
                    <td><input class="themeinput" id="color-background" name="bg" value="" type="text"></td>
                    <td><input class="themeinput" id="color-text" name="text" value="" type="text"></td>
                </tr>
                <tr>
                    <td><label for="color-links">链接</label></td> 
                    <td><label for="color-sidebar">侧栏</label></td> 
                </tr>
                <tr>
                    <td><input class="themeinput" id="color-links" name="links" value="" type="text"></td>
                    <td><input class="themeinput" id="color-sidebar" name="sidebarcl" value="" type="text"></td>
                </tr>
                <tr>
                    <td><label for="color-sidebox">侧边框</label></td> 
                    <td></td> 
                </tr>
                <tr>
                    <td><input class="themeinput" id="color-sidebox" name="sidebox" value="" type="text"></td>
                    <td></td>
                </tr>
            </table>
        </div>
        <div id="colorpicker" style="margin-left:270px"></div>
        <div style="clear:both;"></div>
    </div>
    <p class="act">
        <input type="hidden" name="newbgurl" id="newbgurl" value="<{$my[theme_bgurl]}>">
        <input type="submit" class="button2" id="save" value="保存设置" />&nbsp;&nbsp;&nbsp;
        <input type="button" class="button3" id="cencel" value="取 消"/>
    </p>
    </form>
</div>
</div>
</td>
<td id="sidebar"><include file="Space:homeside"/></td>
</tr>
</table>
<script>
allthemeload();
</script>
<include file="Common:foot" />